<?xml version="1.0" encoding="utf-8"?>
<?xml-sytlesheet type="text/css" href="<?php echo PHP_SELF;?>"?>
<?php include_once('mysql_connection.php'); include_once('setting.php'); include_once('lib/functions.php');?>
<rss version="2.0">
<channel>
	<title><?php echo $setting['site_name'];?></title>
	<link>http://<?php echo $_SERVER['SERVER_NAME'];?>/weblog-wanglei/</link>
	<description><?php echo $setting['site_name'];?></description>
	<language>zh-cn</language>
	<copyright>Coperight (C) DotNetBips.com. All rights reserved.</copyright>
	<?php
		$query_rss_article = "select * from `articles` order by `post_time` desc limit 10";
		$rss_article = $mysql_connection->query($query_rss_article);
		$count_rss_article = $rss_article->num_rows;
		for ($i=0; $i<$count_rss_article; $i++) {
			$each_rss_article = $rss_article->fetch_assoc();
		?>
		<item>
			<title><?php echo $each_rss_article['title'];?></title>
			<link>http://<?php echo $_SERVER['SERVER_NAME'];?>/weblog-wanglei/article.php?aid=<?php echo $each_rss_article['id'];?></link>
			<description><?php echo $each_rss_article['content'];?></description>
			<author>zhudogsupe.wanglei</author>
			<copyright></copyright>
			<pubDate><?php echo $each_rss_article['post_time'];?></pubDate>
		</item>
		<?php
		}
	?>
</channel>
</rss>
